<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=<device-width>, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
   
</body>
<script>
    var str = "nice to meet you";
    //str.slice(start,end)
    //
    var childStr = str.slice(0,7);
    console.log(childStr);


    var str1 = str.slice(1);
    console.log(str1);

    var str2 = str.slice(-3);
    console.log(str2);
</script>
</html>